CSec.cs
Code Type: C# Class
Uses Classes: CDataParameterList, CDataSet, TripleDESCryptoServiceProvider, 3]
Uses PL/SQL Procedures: PCK_FX_SEC.GetFXUserRS, PCK_FX_SEC.InsertFXUser, PCK_FX_SEC_PATIENT.InsertPatientFXUser, PCK_FX_SEC.UpdateFXUserRights, PCK_FX_SEC.UpdateFXUserPWD, PCK_FX_SEC.UpdateFXUserOptions, PCK_FX_SEC_PATIENT.UpdatePatientFXUserPWD, PCK_FX_SEC_PATIENT.UpdatePatientFXUserOptions, PCK_FX_SEC.LogOff, PCK_FX_SEC.AuditTransaction, PCK_FX_SEC.SysLogAuditTransaction, PCK_FX_SEC.AuditPageAccess, PCK_FX_SEC.CertLogin, PCK_FX_SEC.CreateSession, PCK_FX_SEC.Login, PCK_FX_SEC.Sign, PCK_FX_SEC.ChangePassword, PCK_FX_SEC.getFXUsernamePasswordRS, PCK_FX_SEC_PATIENT.getPatientFXUsernamePasswordRS, PCK_FX_SEC.getFXUserIdRS, PCK_FX_SEC_PATIENT.getPatientFXUserIdRS, PCK_FX_SEC_PATIENT.CheckPatientFXUserRecRS, PCK_FX_SEC.CheckFXUserRecRS

Lines of Code: 817

public class CSec

	App Security class 

public CSec()

	Default constructor 

public bool UserNameExists(
        BaseMaster BaseMstr,
        string strUserName)

	does the user name already exist? 

public bool ValidateUserAccountRules( BaseMaster BaseMstr,
                                          string strUserName,
                                          string strPas)

	make sure username and password follow the rules. 

public int GetNumberSpacesCount(string str)

	gets the number of numbers in a string 

public int GetNumberCharCount(string str)

	gets the number of numbers in a string 

public int GetUpperCharCount(string str)

	gets the number of upper case chars in a string 

public int GetLowerCharCount(string str)

	gets the number of lower case chars in a string 

public int GetSpecialCharCount(string str)

	gets the number of special chars in a string 

public bool InsertPatientFXUser(BaseMaster BaseMstr,
                              string strPatientID,
                              string strUserName,
                              string strPas,
                              bool bAccountLocked,
                              bool bAccountInactive,
                              out long lUserID)

	 creates a user account in the central database 

public bool UpdatePatientFXUserPWD(BaseMaster BaseMstr,
                              long lFXUserID,
                              string strUserName,
                              string strPas,
                              bool bAccountLocked,
                              bool bAccountInactive)

	 updates portal account password 

public bool UpdatePatientFXUserOptions(BaseMaster BaseMstr,
                              long lFXUserID,
                              bool bAccountLocked,
                              bool bAccountInactive)

	 updates the user's account record in the database 

public bool CreateSession(BaseMaster BaseMstr,
                              long lFXUserID)

	created a database session for a user. Used after a successful login to an external system such as MDWS to establish a session for the user in the database 

public string Enc(string strClear, string strInitVector)

	encrypt a string using the key in the web.config 

public string dec(string strEnc, string strInitVector)

	decrypt a string using the key in the web.config 

public DataSet GetPatientFXUsernamePasswordDS(BaseMaster BaseMstr)

	 gets the username/password pair for the user's account 

public DataSet GetPatientFXUserIdDS(BaseMaster BaseMstr)

	 gets the user id for the selected patient 

public DataSet CheckPatientFXUserRecDS(BaseMaster BaseMstr)

	 checks if the patient portal account exists 

	

